<?php
/**
*	
*/
class fileClassAction extends apiAction
{

	/**
	*	删除文件
	*/
	public function delAction()
	{
		$id = (int)$this->get('id','0');
		return returnsuccess();
	}

	/**
	*	获取文件编辑等
	*/
	public function fileinfoAction()
	{
		$fnum 	= $this->get('fnum');
		if(is_numeric($fnum)){
			//$frs= m('file')->getone('`id`='.$fnum.'');
			//if(!$frs)return returnerror('不存在');
			//$fnum = $frs['filenum'];
		}
		$lx 	= (int)$this->get('lx','0');
		$barr 	= c('rockfile')->getdata('upload','fileinfo', array(
			'fnum' 	 => $fnum,
			'lx' 	 => $lx,
			'sysuid' => $this->adminid,
			'sysface'=> $this->jm->base64encode($this->adminrs['face']),
			'sysname'=> $this->jm->base64encode($this->adminname),
		));
		$uarr = array('isdel'=>0);
		if($barr['success']){
			$stapt = arrvalue($barr['data'], 'thumbpathout');
			if(!isempt($stapt))$uarr['thumbpath'] = $stapt;
		}
		if($barr['code']==404)$uarr['isdel'] = 1;
		if($uarr)m('word')->update($uarr,"`filenum`='$fnum'");	
		
		return $barr;
	}
}